package cn.edu.qlnu.xky.test.service;

import cn.edu.qlnu.xky.test.common.Page;
import cn.edu.qlnu.xky.test.dao.ReaderDao;
import cn.edu.qlnu.xky.test.model.User;

import java.util.List;

/**
 * @author : wuweihong
 * @desc : TODO  请填写你的功能描述
 * @date : 2025-06-20
 */


public class ReaderService {

	private ReaderDao dao = null;

	public ReaderService() {
		dao = new ReaderDao();
	}

	public int addReader(User reader) {
		return dao.addReader(reader);
	}

	public int editReader(User reader) {
		return dao.editReader(reader);
	}
	public int deleteReader(int id) {
		return dao.deleteReader(id);
	}

	public User searchById(int id) {
		return dao.searchById(id);
	}

	public Page<User> searchByNamePage(String name, int pageNo){
		return dao.searchByNamePage(name, pageNo);
	}

	public int resetPwdReader(int id) {
		return dao.resetPwdReader(id);
	}

	public List<User> searchByName(String name){

		return dao.searchByName(name);
	}

	public List<User> searchEqualName(String name) {
		return dao.searchEqualName(name);
	}

}
